﻿using CatUtils.Utils.Currency;
using CatUtils.Utils.Currency.TextUtils;
using System;
using System.Windows.Forms;

namespace RabbitDownload.WebSite.Bcy.Search
{
    public partial class BcySearchControl : UserControl
    {
        public BcySearchControl()
        {
            InitializeComponent();
            InitView();
        }

        private void InitView()
        {
            this.Width = Helper.StaticValueOld.GroupboxWidth;
            this.Height = Helper.StaticValueOld.GroupboxHeight;

            checkBox5.Checked = BcyStaticValue.UseLogFlag;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            ScannerBcySearch.Start(textBox1.Text);
        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {
            BcyStaticValue.Score = TextHelper.StringToInt(textBox2.Text);
            Console.WriteLine("当前分数设置：" + BcyStaticValue.Score);
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            BcyStaticValue.Tag = textBox1.Text;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            BcyHelper.DeleteLog();
        }

        private void checkBox5_CheckedChanged(object sender, EventArgs e)
        {
            BcyStaticValue.UseLogFlag = checkBox5.Checked;
        }
    }
}